package com.cheetah.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author Administrator
 * @Date 2020/8/4
 * @Version V1.0
 * @Description:
 **/
public class OrgUtil {

    public static String contact(String parent, String self){
        return StringUtils.join(parent,self,"!");
    }

    public static String contact(String item){
        return StringUtils.join("!",item,"!");
    }

    public static String replace(String longName,String name){
        String[] longNames = longName.split("!");
        longNames[longNames.length - 1] = name;
        return StringUtils.join(StringUtils.join(longNames,"!"),"!");
    }
}
